﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ShowEvents.aspx.cs" Inherits="TicketingCompanyv2.ShowEvents" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="Telerik.OpenAccess.Web" namespace="Telerik.OpenAccess" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EventsDataSource">
        <MasterTableView autogeneratecolumns="False" datasourceid="EventsDataSource">
            <CommandItemSettings ExportToPdfText="Export to PDF">
            </CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Title" 
                    FilterControlAltText="Filter Title column" HeaderText="Title" 
                    SortExpression="Title" UniqueName="Title">
                </telerik:GridBoundColumn>

                <telerik:GridDropDownColumn DataField="LocationID" DataSourceID="LocationsDataSource" HeaderText="Location" 
                ListTextField = "Name" ListValueField = "LocationID" UniqueName="Location">
               
                </telerik:GridDropDownColumn>

                <telerik:GridDateTimeColumn DataField="Date" UniqueName="DateTimePicker" HeaderText="Date" DataType="System.DateTime"
                PickerType="DateTimePicker">
                    
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Price" DataType="System.Decimal" 
                    FilterControlAltText="Filter Price column" HeaderText="Price" 
                    SortExpression="Price" UniqueName="Price">
                </telerik:GridBoundColumn>
                
                <telerik:GridDropDownColumn DataField="CategoryID" DataSourceID="CategoryDataSource" HeaderText="Category"
                ListTextField="Name" ListValueField="CategoryID" UniqueName="CategoryDropDown">
                    
                </telerik:GridDropDownColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <telerik:OpenAccessDataSource ID="EventsDataSource" runat="server" 
        ObjectContextProvider="TicketingCompany.DAL.TicketingCompaniesModel, TicketingCompany.DAL" 
        OrderBy="Date" TypeName="TicketingCompany.DAL.Event">
    </telerik:OpenAccessDataSource>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <telerik:OpenAccessDataSource ID="LocationsDataSource" runat="server" 
        ObjectContextProvider="TicketingCompany.DAL.TicketingCompaniesModel, TicketingCompany.DAL" 
        TypeName="TicketingCompany.DAL.Location">
    </telerik:OpenAccessDataSource>

    <telerik:OpenAccessDataSource ID="CategoryDataSource" runat="server" 
        ObjectContextProvider="TicketingCompany.DAL.TicketingCompaniesModel, TicketingCompany.DAL" 
        OrderBy="Name" TypeName="TicketingCompany.DAL.Category">
    </telerik:OpenAccessDataSource>

</asp:Content>
